﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 计算器
{
    class Program
    {
        static void Main(string[] args)
        {
            string Addition1, Addition2, Symbol;
            int num1, num2, num3 = 0;
            Console.WriteLine("请输入第一个参数:");
            Addition1 = Console.ReadLine();
            Console.WriteLine("请输入第二个参数:");
            Addition2 = Console.ReadLine();
            num1 = int.Parse(Addition1);
            num2 = int.Parse(Addition2);
            Console.WriteLine("请输入运算符号:");
            Symbol = Console.ReadLine();
            if(Symbol == "+")
            {
                num3 = num1 + num2;

            }
            else if (Symbol == "-")
            {
                num3 = num1 - num2;

            }
            else if (Symbol == "*")
            {
                num3 = num1 * num2;

            }
            else if(Symbol == "/")
            {
                num3 = num1 / num2;

            }
            else Console.WriteLine("输入无效！");
            Console.WriteLine("结果是：");
            Console.WriteLine(num3.ToString());
            Console.ReadKey();

        }
    }
}
